package com.socool.sinofaith.view;

import com.socool.sinofaith.R;

import android.app.Dialog;
import android.content.Context;
import android.os.Bundle;
import android.text.TextUtils;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;

public class TiPsDialog extends Dialog {

	Context context;
	private Button okButton;
	private TextView titleTextView, descTextView;
	private String mTitle, mDesc;

	public TiPsDialog(Context context) {
		super(context);
		// TODO Auto-generated constructor stub
		this.context = context;
	}

	public TiPsDialog(Context context, int theme, String titile, String desc) {
		super(context, theme);
		this.context = context;
		mTitle = titile;
		mDesc = desc;

	}

	public TiPsDialog(Context context, int theme) {
		super(context, theme);
		this.context = context;
	}

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		this.setContentView(R.layout.dialog_tips);
		okButton = (Button) findViewById(R.id.dialog_button_ok);
		titleTextView = (TextView) findViewById(R.id.titleTextView);
		descTextView = (TextView) findViewById(R.id.descTextView);
		if (!TextUtils.isEmpty(mTitle)) {
			titleTextView.setText(mTitle);
		}
		if (!TextUtils.isEmpty(mDesc)) {
			descTextView.setText(mDesc);
		}

		okButton.setOnClickListener(new android.view.View.OnClickListener() {
			@Override
			public void onClick(View arg0) {
				TiPsDialog.this.dismiss();

			}
		});
	}

}
